﻿namespace SampleApplication.CoffeeShopSample.Implementation.Domain
{
    #region Usings

    using Dependencies.Domain;
    using System;
    using System.Collections.Generic;
    using System.Linq;

    #endregion Usings

    public class CoffeeMachine : ICoffeeMachine
    {
        public IBeverage MakeCoffee(IEnumerable<ICoffeeBean> coffeeBeans)
        {
            if (coffeeBeans == null) throw new ArgumentNullException("coffeeBeans");

            // Just some fake logic, for each bean we get 10 ml of Coffee
            var quantity = coffeeBeans.Count() * 10;

            return new Coffee(quantity);
        }
    }
}